﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using GestionaleBolletta.logic;

namespace GestionaleBolletta
{
    public partial class nuovoPagamento : Form
    {
        //public nuovoPagamento()
        //{
        //    InitializeComponent();
        //}
        public int idPagamento { get; set; }
        
        public nuovoPagamento(int id)
        {
            InitializeComponent();
            idPagamento = id;
        }

        private void saveFileDialog1_FileOk(object sender, CancelEventArgs e)
        {

        }

        private void button1_Click(object sender, EventArgs e)
        {
            saveFileDialog1.ShowDialog();
        }

        public void AddDataPagamento(DateTime dataPagamento)
        {
            
        }

        private void bt_confermaNuovoPagamento_Click(object sender, EventArgs e)
        {
            DateTime dataPagamento = dt_dataPagamento.Value;

            GestioneXML GestioneXml = new GestioneXML();

            GestioneXml.UpdateBollettaXml(idPagamento, dataPagamento);
            this.Close();
        }
    }
}
